package org.itsolutions.javaBackup.spi;

import org.itsolutions.javaBackup.exceptions.AException;

/**
 * Task that it's started during the module start. The task should be binded using the guice multibinder mechanizm.
 * @author Tomas Fecko
 */
public interface IModuleStartStopTask {


	/**
	 * After module is bootstrapped/loaded this method is called.
	 * @throws AException any exception during the process
	 */
	void start() throws AException;

	/**
	 * If module should by stopped, before the stop, this method is called.
	 * @throws AException any exception during the process
	 */
	void stop() throws AException;
	
	/**
	 * 
	 * @return true, if module is started
	 * @throws AException any exception during the process 
	 */
	boolean isStarted() throws AException;
	
	/**
	 * 
	 * @return module of startStop task
	 */
	EModule getModule();
}




